Method and apparatus for measuring audiovisual synchronisation

ABSTRACT

There is provided a method of measuring audiovisual synchronization between at least one encoded audio stream and at least one encoded video stream, comprising measuring the time of input into an audio encoder of source audio data to be encoded into said encoded audio stream, measuring the time of input into a video encoder of source video data to be encoded into said encoded video stream, determining a Presentation Time Stamp value, indicative of a time of presentation, for each of the respective at least one encoded audio stream and at least one encoded video stream, and transmitting a measured audio input time, a measured video input time and presentation time stamp values to a downstream component. There is also provided an apparatus and system for measuring audiovisual synchronization between at least one encoded audio stream and at least one encoded video stream.

This application is the U.S. national phase of International ApplicationNo. PCT/EP2008/067791, filed 17 Dec. 2008, which designated the U.S.,the entire content of which is hereby incorporated by reference.

TECHNICAL FIELD

The invention is related to digital video encoding and decoding ingeneral, and in particular to a method and apparatus for measuringaudiovisual synchronisation.

BACKGROUND

Audiovisual data, for example broadcast television or on demand movies,is extremely large in size. Hence, methods of digitally compressingaudiovisual data have been developed, for example Motion Picture ExpertsGroup (MPEG)-2 and MPEG-4 Part 10/H.264.

A basic compression system 100, as deployed in broadcast television,consists of an encoder (compressor) and a decoder (de-compressor) asillustrated by FIG. 1.

In FIG. 1, the video to be encoded is inputted into a video encoder 110,which produces an elementary stream of digitally compressed video data130. The encoder includes a Presentation Time Stamp (PTS) insertion unit115, which inserts PTS's into the video elementary stream, according tothe requirements of the digital video encoding standard in use with thesystem 100 (e.g. MPEG-4).

Meanwhile, the audio corresponding to the video is inputted into anaudio encoder 120, again having a PTS insertion unit 125, to produce anelementary stream of digitally compressed audio data 135.

A multiplexing unit 140 multiplexes the video and audio elementarystreams together to form a Transport Stream 145, ready for transmissionto a receiver 155 through a network 150 or stored on a storage devicefor later transmission.

A typical receiver 155 will comprise the units required to carry out thereverse process of decoding. In particular, there is a de-multiplexer160, which provides the de-multiplexed elementary streams to the videodecoder 170 and audio decoder 180 respectively. To enable the PTS valuesto be used, a PTS detection unit (175/185) is generally included in eachaudio or video decoder.

The bit stream 145 out of the multiplexer 140 may be stored at severalstages within the network 150 and/or may also be re-multiplexed severaltimes with other audiovisual data streams.

The inputs to an encoder (110, 120) are generally uncompressed audio orvideo data, and corresponding pairs of audio and video encoders (110,120), operating on the same source audiovisual material, are expected tohave source material that is correctly synchronized at source.

However, for various reasons, it is possible for these inputs to arriveat their respective encoder with relative delays, so that the audio andvideo of a corresponding pair of encoders are not always correctlysynchronized.

Furthermore the encoding systems themselves introduce delays which arenot necessarily the same for both the video and audio, because the audioand video are separated during both the encode and the decode processes(as shown in FIG. 1).

Moreover, the decoder and encoder are also geographically separated.This separation may lead to the audio and video no longer being alignedwhen they reach the viewer, despite their arrival at the respectiveencoders in adequately synchronized form.

Ideally the encoder system would be able at least to detect thismis-alignment, measure its value and then correct it, but no industryagreed method exists for this and the various manufacturers ofcompression systems and their customers who operate them use a varietyof means to deal with the problem of audiovisual synchronisation—fromdoing nothing, to regular system calibration. Nevertheless, no fullysatisfactory method currently exists to assure operators of correctaudiovisual alignment at all times.

One simplistic way to check the alignment of audio and video at theoutput of a compression system is to use a known pair of video and audiosignals. One example of such a scheme is to use a “flash” and “beep”signal, which is a derivative of the well known method used in the filmindustry of a clapper board that links a given film frame with a welldefined sound.

Such a scheme is described in British Patent 2,341,758 A. The marking ofa given video frame with a flash and simultaneously the audio with ashort “beep” enables a measure of how far apart the audio and video areat the output of a test decoder.

However, this is clearly an inconvenient method as it has to be doneoff-line (i.e. whilst the system is not broadcasting to users) eithermanually, or using a PC package that automates this process.

There are several audiovisual (AV) synchronization software measurementpackages available, but these still rely on decoding the compressedaudio and video before measuring the audiovisual synchronization and thedecoding step itself may affect the result. These methods only measurethe relative synchronization, which clearly requires manual interventionto perform the measurement and then take any remedial steps to correctany defect.

One key issue is to establish whether the audio and video are misalignedduring the encoding processes themselves, for example due to a lack ofcalibration of the respective encoders, or whether the misalignment isdue to mis-aligned signals arriving at the encoders. Whilst the formercan be corrected by proper calibration of the encoders under test, thelatter cannot be corrected without an escalation of the measurement tothe preceding transmission system.

To be able to check the audiovisual synchronization at the output of anencoder, a decoder is required, but a decoder (hardware or software)will also separate the audio and video components and may introduce itsown audiovisual synchronization error. This means that the overallsystem audiovisual synchronization is being measured, and not that ofjust an encoder, and it is impossible to isolate how much of theaudiovisual synchronization error is due to the encode process, or thedecoder. Accordingly, it would be desirable to have a method andapparatus for testing audiovisual synchronisation that can measure thedelay of the encoder only, and which works whilst thebroadcast/transmission system is online (i.e. operating to provideaudiovisual data to end viewers).

Furthermore, once compressed, the data stream from the encoder systemtypically uses the MPEG-2 Transport Stream standard (ISO/IEC 13818-1:Information technology—Generic coding of moving pictures and associatedaudio information: Systems) to convey the combined compressed audio andvideo data, as well as other related signals, to the decoder. ThisMPEG-2 Transport Stream standard is also used in more recent videoencoding standards, such as H.264.

Accordingly, it would also be desirable to have a method of estimatingthe state of audiovisual synchronization within a Transport Stream,because it would negate the need to use a separate offline physical orPC based decoder during measurement.

SUMMARY

Embodiments of the present invention provide a method of measuringaudiovisual synchronisation between at least one encoded audio streamand at least one encoded video stream, comprising measuring the time ofinput into an audio encoder of source audio data to be encoded into saidencoded audio stream, measuring the time of input into a video encoderof source video data to be encoded into said encoded video stream,determining a Presentation Time Stamp value, indicative of a time ofpresentation, for each of the respective at least one encoded audiostream and at least one encoded video stream, and transmitting ameasured audio input time, a measured video input time and presentationtime stamp values to a downstream component.

Optionally, instead of transmitting the measured audio and video inputtimes, the method further comprises calculating a difference between thetime of presentation and the measured time of input for each of the atleast one encoded audio stream and at least one encoded video stream,determining an audiovisual synchronisation value from the calculateddifference.

Optionally, the step of determining an audiovisual synchronisation valuecomprises subtracting the calculated difference between the time ofpresentation and the measured time of input for the encoded audio streamfrom the calculated difference between the time of presentation and themeasured time of input for the encoded video stream.

Optionally, the time of input into an audio encoder of source audio datato be encoded into said encoded audio stream and the time of input intoa video encoder of source video data to be encoded into said encodedvideo stream are measured using a clock also used to produce thePresentation Time Stamp value.

Optionally, the clock is the encoder system clock.

Optionally, the Presentation Time Stamp value is determined according toa digital compression standard(s) in use to compress the encoded audiostream and encoded video stream.

Optionally, the measured audio input time and the measured video inputtime, or the audiovisual synchronisation value is inserted into atransport stream containing the encoded audio stream and encoded videostream, for use by downstream components in determining the delay of anupstream audio and video encoder pair.

Optionally, the downstream components display said measured audio inputtime and the measured video input time, or said audiovisualsynchronisation value.

Optionally, the downstream components use said audiovisualsynchronisation value to automatically re-align the encoded audio streamand the encoded video stream.

Optionally, at least one encoded audio stream and at least one encodedvideo stream comprises a corresponding audiovisual pair to be presentedin synchronisation.

Embodiments of the present invention also provide an apparatus formeasuring audiovisual synchronisation between at least one encoded audiostream and at least one encoded video stream, comprising a delaycalculation unit, adapted to measure audiovisual synchronisationaccording to any of the above audiovisual synchronisation measurementmethod, and a private data encoder adapted to encode data indicative ofthe measured audiovisual synchronisation into a transport stream.

Optionally, the apparatus is an audiovisual encoder. However, it mayform any part of the overall audiovisual broadcast/transmission systemin use.

Embodiments also provide a system for measuring audiovisualsynchronisation between at least one encoded audio stream and at leastone encoded video stream and outputting a measured audiovisualsynchronisation value, comprising an encoder apparatus adapted accordingto the above methods, and a decoder apparatus comprising a private datadecoder adapted to decode private data in a audiovisual transport streamcontaining said data indicative of the measured audiovisualsynchronisation.

BRIEF DESCRIPTION OF THE DRAWINGS

A method and apparatus for measuring audiovisual synchronisation willnow be described, by way of example only, with reference to theaccompanying drawings in which:

FIG. 1 shows a block schematic diagram of a prior art MPEG coding andtransport stream system;

FIG. 2 shows a block schematic diagram of a MPEG coding and transportstream system according to an embodiment of the present invention;

FIG. 3 shows a flow diagram of a method for measuring audiovisualsynchronisation according to an embodiment of the present invention.

DETAILED DESCRIPTION

Embodiments of the invention will now be described with reference to theaccompanying drawings in which the same or similar parts or steps havebeen given the same or similar reference numerals.

The aim of this invention is to measure the audiovisual synchronizationvalue at the output of an encoder without decoding the compressed data.

It is possible to calculate the overall audiovisual synchronizationvalue as follows:audiovisual synchronization value=total audio delay−total video delay.Where:total audio delay=audio presentation time−audio input time; andtotal video delay=video presentation time−video input time.

The audio input time is the time of input into an audio encoder ofsource audio data to be encoded. Similarly, the video input time is thetime of input into a video encoder of source video data to be encoded.

The time at which both the audio and video enter the encoder can beobtained at the start of the encode process by using the encoder systemclock as a reference.

Because the two encoding processes are separate before their output datastreams are combined, compression standards generally provide for theencoder to calculate the time at which both the video and audio shouldbe presented to the viewer by the decoder. This presentation informationis carried as an essential part of the MPEG-2/4 standards, and takes theform of Presentation Time Stamps (PTS) that are present in both theaudio and video streams. This is the reason for having PTS insertionunits 115 and 125 at the encoder side of the system, and PTS detectionunits 175 and 185 at the decoder side.

The audio and video presentation time in the above calculations arederived from the respective Presentation Time Stamp.

Since compression standards are open standards to which any manufacturermay make equipment, and there is an assumption that all implementationsof a digital compression standard will be interoperable (the wholereason for a standard), any decoder is assumed to be compliant withMPEG-2/4 systems requirements. The presence and use of PTS stamps inparticular is often further enforced by virtue of system designersmaking necessary internal timing adjustments using the PTS.

Therefore the time the video and audio should be presented to the viewerare known through the Presentation Time Stamps, and should be correctregardless of any differences in encoding or decoding equipment used.Should the time at which the video and audio data enter the broadcastchain also be known (by using a system clock), then it is possible tocontinuously calculate the respective encoder/decoder coding delays.

To enable the delay information to be disseminated to downstreamsystems, these resultant calculated delays can be carried in the privatedata sections of the MPEG-2 Transport Stream standard. This downstreamdissemination makes the delay data 275 available for any purpose in thetransmission chain or specifically at the decoder.

Alternatively, in some embodiments, only the audio input time and videoinput times are sent together with the Presentation Time Stamps. This isbecause it is possible the PTS may get altered by some other piece ofequipment in the broadcast chain (i.e. multiplexers) and if the delaycalculation is not left to downstream equipment to carry out, it may beinaccurate. Further embodiments may send both the measured audio andvideo input time data, and audiovisual synchronisation data.

Put another way, by sending the raw input time data from which the delaycan be calculated, instead of the calculated delay itself, suitablymodified downstream equipment may make their own delay calculations fromthe PTS values currently in use. This is useful in the cases where thePTS values are altered by the transmission equipment as the audiovisualdata is transmitted, or where the downstream equipment needs tocalculate its own delay.

The output stream from an encoder according to an embodiment of theinvention can thus be monitored and/or recorded and can be analyzed on-or off-line to find the audio and video input times and PTS values, fromwhich the audiovisual synchronization value can be calculated.Alternatively, the audiovisual synchronisation value may be provided inthe Transport Stream directly.

The transmitted measured delay values/raw input time data can be then beused by suitably enabled downstream equipment to adjust the audio andvideo alignment automatically (assuming that other requirements are notbroken) or they can be displayed to an engineer who can track delays inreal-time and/or make manual adjustments.

As mentioned previously, the MPEG compression standard requires a systemclock reference which is distributed within a compliant encoder. Byrecording this system clock value regularly when the video and audiodata arrives, an exact measure of the time the respective sourcematerials enter the encoding process can be known and recorded.

This clock reference value is then also used to calculate thepresentation time stamp (PTS) for both the audio and video components.The calculation of the PTS is done within the encoder 110/120, and isused to synchronize the components in an MPEG-2 transport stream. Therespective PTS value is the time at which the audio or video data is tobe presented to the viewer.

The encoder 110/120 measures the actual input time and the requiredplay-out time for each component, and hence the required delays can becalculated:Audio delay=time presented−time inVideo delay=time presented−time in

This delay information or audio/video input times, may then be includedin the MPEG-2 Transport Stream(s) in various ways:

1) As private data in a portion of the MPEG-2 Transport Stream reservedfor carrying private data transmissions.

2) As private data in the part of the MPEG-2 transport stream known asthe Packetized Elementary Stream.

3) As private data in the elementary stream itself.

Option 1 is the preferred method of incorporating delay data into theTransport Stream. However, each option utilises a similar form of datainsertion, albeit at a different logical level within the TransportStream. If a secure method of sending the delay data is required, it maybe encoded into the audiovisual data itself.

FIG. 2 shows an embodiment of the present invention, where the overallsystem is much the same as that shown in FIG. 1. However, the encodingside of FIG. 2 also includes a delay calculation unit 220, which usesthe system clock/timer 210 to measure the audio and video input times orcalculate the encoder system delay as described in more detail above.

The delay calculation unit 220 provides the audio and video input timesand/or delay data to a Private Data Encoder 230, which may provide theencoded delay data to the PTS insertion unit 237, to insert in a similarway to the PTS data, or it may provide the data directly to themultiplexer 140 (235) to be inserted/multiplexed into the TransportStream in one of the other methods mentioned above.

In some implementations, the Private data encoder 230 may receive PTSdata from the PTS insertion unit 115/125, for passing back to the delaycalculation unit 220 (hence path 237 is bi-directional, and in dottedlines) for use in calculating the delay.

The multiplexer 240 therefore outputs a transport stream 245 with delaydata embedded within it, for transmission over the network, or forstorage in a storage device 150, both as per the prior art.

As mentioned previously, depending on whether downstream equipment willalter the PTS values or not, the delay data may take the form of thecalculated delay or simply the raw input data and PTS value data fromwhich the delay can be calculated.

Typically, the delay data is inserted into the transport stream withinthe same transport stream frame as the PTS to which the delay datarelates. Hence, if used, the delay calculation is carried out in a veryshort time. However, since it is not a highly complex and convolutedcalculation, there is sufficient time to do so. For the case where onlythe measured audio and video input times are sent, there is nocalculation delay anyway.

At the receiver 255 side, the decoding system now incorporates a privatedata decoder unit 270 which takes the de-multiplexed encoded delay data265, or the delay data encoded into the respective audio or videostreams and which is extracted by the PTS detection unit 267 (if thisform of delay data insertion is used), and decodes the delay data 275ready for display at the decoding side, or for use in controlling asuitable form of automatic audiovisual synchronisation. Where only themeasured audio and video input times are sent across, the delaycalculation may be carried out at this point instead.

FIG. 3 shows the method for measuring audiovisual synchronisation 300according to an embodiment of the present invention where the measuredinput times are sent to downstream equipment for use therein. Inparticular, the method 300 comprises measuring the audio input time atstep 310, measuring the video input time at step 320, determining a PTSvalue (according to compression standards in use) at step 330 and thentransmitting the measured audio and video input times together with thePTS values at step 340. In some embodiments, step 340 may instead be adelay calculation step as described in more detail above.

With the above-described method of calculating audiovisualsynchronization values, the actual difference (i.e. delay) can bemeasured at the output of an encoder, negating the use of a separatetest decoder. Thus, a specific test signal is no longer required tomeasure audiovisual synchronization, and the delay measurement can beused in a broadcast situation, without affecting the broadcast.

The method may be embodied as a specially programmed, or hardwaredesigned, integrated circuit which operates to carry out the audiovisualsynchronisation measurement method on data loaded into the saidintegrated circuit. The integrated circuit may be formed as part of ageneral purpose computing device, such as a PC, and the like, or it maybe formed as part of a more specialised device, such as a games console,mobile phone, portable computer device or hardware video encoder.

One exemplary hardware embodiment is that of a Field Programmable GateArray (FPGA) programmed to carry out the described method, located on adaughterboard of a rack mounted video encoder, for use in, for example,a television studio or location video uplink van supporting anin-the-field news team.

Another exemplary hardware embodiment of the present invention is thatof a video pre-processor made out of an Application Specific IntegratedCircuit (ASIC).

It will be apparent to the skilled person that the exact order andcontent of the processing order in the method described herein may bealtered according to the requirements of a particular set of executionparameters, such as speed of encoding, accuracy, and the like.Accordingly, the claim numbering is not to be construed as a strictlimitation on the ability to move steps between claims, and as suchportions of dependent claims maybe utilised freely.

The invention claimed is:
 1. A method of measuring audiovisualsynchronisation between at least one encoded audio strewn and at leastone encoded video stream, comprising: measuring the time of input intoan audio encoder of source audio data to be encoded into said encodedaudio stream; measuring the time of input into a video encoder of sourcevideo data to be encoded into said encoded video stream; determining aPresentation Time Stamp value, indicative of a time of presentation, foreach of the respective at least one encoded audio stream and at leastone encoded video stream; and transmitting the measured audio inputtime, the measured video input time, and the presentation time stampvalues to a downstream component.
 2. The method of claim 1, wherein thetime of input into an audio encoder of source audio data to be encodedinto said encoded audio stream and the time of input into a videoencoder of source video data to be encoded into said encoded videostream are measured using a clock also used to produce the PresentationTime Stamp value.
 3. The method of claim 2, wherein the clock is theencoder system clock.
 4. The method of claim 1, wherein the PresentationTime Stamp value is determined according to one or more digitalcompression standards in use to compress the encoded audio stream andencoded video stream.
 5. The method of claim 1, wherein the measuredaudio input time and the measured video input time are inserted into atransport stream containing the encoded audio stream and encoded videostream, for use by downstream components in determining the delay of anupstream audio and video encoder pair.
 6. The method of claim 5, whereindownstream components display said measured audio input time and themeasured video input time.
 7. The method of claim 1, wherein each atleast one encoded audio stream and at least one encoded video streamcomprises a corresponding audiovisual pair to be presented insynchronisation.
 8. Apparatus for measuring audiovisual synchronisationbetween at least one encoded audio stream and at least one encoded videostream, comprising: a delay calculation unit confirmed to measureaudiovisual synchronisation according to claim 1; and a private dataencoder confirmed to encode data indicative of the measured audiovisualsynchronisation into a transport stream.
 9. The apparatus of claim 8,wherein the apparatus is an audiovisual encoder.
 10. A system formeasuring audiovisual synchronisation between at least one encoded audiostream and at least one encoded video stream and outputting a measuredaudiovisual synchronisation value, comprising: the encoder apparatus ofclaim 9; and a decoder apparatus comprising a private data decoderadapted to decode private data in a audiovisual transport streamcontaining said data indicative of the measured audiovisualsynchronisation.
 11. The method of claim 1, wherein the audiovisualsynchronisation value is inserted into a transport stream containing theencoded audio stream and encoded video stream, for use by downstreamcomponents in determining the delay of an upstream audio and videoencoder pair.
 12. The method of claim 11, wherein downstream componentsdisplay said audiovisual synchronisation value.
 13. The method of claim11, wherein downstream components use said audiovisual synchronisationvalue to automatically re-align the encoded audio stream and the encodedvideo stream.
 14. A method of measuring audiovisual synchronisationbetween at least one encoded audio stream and at least one encoded,video stream, comprising: measuring the time of input into an audioencoder of source audio data to be encoded into said encoded audiostream; measuring the time of input into a video encoder of source videodata to be encoded into said encoded video strewn; determining a time ofpresentation value for each of the respective at least one encoded audiostream and at least one encoded video stream; calculating a differencebetween the time of presentation and the measured time of input for eachof the at least one encoded audio stream and at least one encoded videostream; and determining an audiovisual synchronisation value from thecalculated difference.
 15. The method of claim 14, wherein the step ofdetermining an audiovisual synchronisation value comprises: subtractingthe calculated difference between the time of presentation and themeasured time of input for the encoded audio stream from the calculateddifference between the time of presentation and the measured time ofinput for the encoded video stream.
 16. The method of claim 14, whereinthe time of input into an audio encoder of source audio data to beencoded into said encoded audio stream and the time of input into avideo encoder of source video data to be encoded into said encoded videostream are measured using a clock also used to produce the time ofpresentation value.
 17. The method of claim 16, wherein the clock is theencoder system clock.
 18. The method of claim 14, wherein the time ofpresentation value is determined according to one or more digitalcompression standards in use to compress the encoded audio stream andencoded video stream.
 19. The method of claim 14, wherein each at leastone encoded audio stream and at least one encoded video stream comprisesa corresponding audiovisual pair to be presented in synchronisation. 20.Apparatus for measuring audiovisual synchronisation between at least oneencoded, audio stream and at least one encoded video stream, comprising:a delay calculation unit confirmed to measure audiovisualsynchronisation according to claim 14; and a private data encoderconfirmed to encode data indicative of the measured audiovisualsynchronisation into a transport stream.
 21. The apparatus of claim 20,wherein the apparatus is an audiovisual encoder.
 22. A system formeasuring audiovisual synchronisation between at least one encoded audiostream and at least one encoded video stream and outputting a measuredaudiovisual synchronisation value, comprising: the encoder apparatus ofclaim 21; and a decoder apparatus comprising a private data decoderadapted to decode private data in a audiovisual transport streamcontaining said data indicative of the measured audiovisualsynchronisation.